// 所有要修改饿了么主题色配置都在此文件中
// :root {
//     --el-color-primary: rgb(64, 108, 224);
// }
// deep 通过 #{deep('selector')} 使用
// & #{deep('selector')} {} => $ [class~="selector"] {}
@function deep($selector: null) {
    @return '[class~="#{$selector}"]';
}

.el-button--primary:not(.is-text, .is-link, .el-button--text) {
    background-color: rgb(64, 108, 224);
    border-color: rgb(64, 108, 224);
}

.el-button--primary:not(.is-text, .is-link, .el-button--text):hover {
    background-color: rgba(64, 108, 224, 0.8);
    border-color: rgba(64, 108, 224, 0.8);
}

.el-pagination.is-background .el-pager li:not(.is-disabled).is-active {
    background-color: rgba(64, 108, 224);
    border-color: rgba(64, 108, 224);
}

.el-card {
    border: none;
}
.el-table {
    // 每行鼠标经过得样式
    .el-table__body tr:hover > td:not(.el-table-fixed-column--right) {
        background-color: rgba(0, 148, 255, 0.12) !important;
    }
    .el-table__body tr.current-row > td {
        background-color: rgba(223, 225, 228, 0.9) !important;
    }
    th {
        background: rgb(243, 244, 247) !important;
        color: #353a42;
    }
}
.el-table .warning-row {
    --el-table-tr-bg-color: rgba(223, 225, 228, 0.9);
}

.el-dialog .dialog-footer {
    display: flex;
    justify-content: center;
}
.el-dialog {
    background-color: #fafafa;
    border-radius: 12px;
    .dialog-header {
        font-weight: bold;
        font-size: 18px;
    }

    .el-dialog__footer {
        text-align: center;
    }
}
.el-cascader-node > .el-radio {
    width: 10%;
}
input:focus {
    border: none;
}

// 美化滚动条
@mixin scrollbar() {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;

    &::-webkit-scrollbar {
        width: 5px;
    }

    &::-webkit-scrollbar-track {
        -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
        border-radius: 10px;
    }

    &::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }
}

@mixin define($selector, $combo: false) {
    @if $combo {
        &[class~='#{$selector}'] {
            @content;
        }
    } @else {
        & [class~='#{$selector}'] {
            @content;
        }
    }
}

@mixin defineEl($selector) {
    & [class~="#{'el-' + $selector}"] {
        @content;
    }
}

// line-height 等于字号
@mixin lineFont($size, $weight: 400) {
    line-height: 1;
    @include font($size, $weight);
}

// 基础字号封装，字重默认为 400
@mixin font($size, $weight: 400) {
    font-size: $size + px;
    font-weight: $weight;
}

// 单行文字超出部分显示省略号
%row {
    overflow: hidden;
    word-break: keep-all;
    white-space: nowrap;
    text-overflow: ellipsis;
}
@mixin highlight() {
    flex: 1;
    overflow-y: auto;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    @include scrollbar;
    & [class~='el-tree-node__content'] {
        height: 32px;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        font-size: 13px;
        margin-top: 2px;
    }

    & [class~='is-current'] > [class~='el-tree-node__content'] {
        background-color: rgba(47, 125, 241, 0.12) !important;
        border-radius: 6px;
        color: rgb(47, 125, 241);
        font-weight: 600;
    }

    & [class~='el-tree-node__content']:hover {
        background-color: rgba(47, 125, 241, 0.12);
        border-radius: 6px;
    }
}
@mixin searchForm($height) {
    display: flex;
    height: $height;
    align-items: center;
    & [class~="#{'el-form-item'}"] {
        margin-bottom: 0;
        margin-right: 10px;
    }
    & [class~="#{'el-select'}"] {
        width: 180px;
    }
    & [class~="#{'el-input'}"] {
        width: 180px;
    }
}
